package com.wangsd.web.face.mapper;

import com.wangsd.web.face.entity.AppVersion;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author generator
 * @since 2019-10-28
 */
public interface AppVersionMapper extends BaseMapper<AppVersion> {

    @Select("select t.id,t.description,t.created_time as createdTime,t.down_url as downUrl," +
            "t.is_must as isMust,t.is_push as isPush,t.push_time as pushTime ," +
            "t.version_no as versionNo from app_version t " +
            "where version_no > '${versionNo}' and is_push = 1 order by version_no desc limit 1  ")
    AppVersion selectNewest(@Param("versionNo") String versionNo);

}
